<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>psDash - Linux system dashboard</title>
        <link href="{{ url_for(".static", filename="css/bootstrap.min.css") }}" rel="stylesheet">
        <link href="{{ url_for(".static", filename="css/psdash.css") }}" rel="stylesheet">
        <link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400' rel='stylesheet' type='text/css'>
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div id="psdash">
            <div class="header">
                <div class="logo">
                    <a href="{{ url_for(".index") }}">
                        <span class="app-name"># psdash <small>v0.6.0</small></span>
                    </a>
                </div>
                <div class="top-nav">
                    <div class="host-info">
                        <div class="name">
                             <span class="hostname">{{ hostname }}</span>
                        </div>
                        <div class="info">
                            {{ os }}, uptime: {{ uptime }}
                        </div>
                    </div>
                    <div class="dropdown">
                        <span class="dropdown-text">Switch server:</span>
                        <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
                            {{ current_node.name }} ({{ current_node.get_id() }})
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            {% for id, n in nodes.iteritems() %}
                                <li><a href="{{ url_for(".index", node=id) }}">{{ n.name }} ({{ id }})</a></li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>
            </div>
            <div class="table-container">
                <div class="content">
                    <div class="left-nav">
                        <ul class="menu">
                            <li {% if page == "overview" %}class="active"{% endif %}>
                                <a href="{{ url_for(".index") }}">
                                    <span class="glyphicon glyphicon-th"></span>
                                    <span class="option-text">Dashboard</span>
                                </a>
                            </li>
                            <li {% if page == "processes" %}class="active"{% endif %}>
                                <a href="{{ url_for(".processes") }}">
                                    <span class="glyphicon glyphicon-tasks"></span>
                                    <span class="option-text">Processes</span>
                                </a>
                            </li>
                            <li {% if page == "network" %}class="active"{% endif %}>
                                <a href="{{ url_for(".view_networks") }}">
                                    <span class="glyphicon glyphicon-transfer"></span>
                                    <span class="option-text">Network</span>
                                </a>
                            </li>
                            <li {% if page == "disks" %}class="active"{% endif %}>
                                <a href="{{ url_for(".view_disks") }}">
                                    <span class="glyphicon glyphicon-hdd"></span>
                                    <span class="option-text">Disks</span>
                                </a>
                            </li>
                            <li {% if page == "logs" %}class="active"{% endif %}>
                                <a href="{{ url_for(".view_logs") }}">
                                    <span class="glyphicon glyphicon-book"></span>
                                    <span class="option-text">Logs</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                    <div class="main-content">
                        {% block content %}{% endblock %}
                    </div>
                </div>
            </div>
        </div>

        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="{{ url_for(".static", filename="js/jquery.min.js") }}"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="{{ url_for(".static", filename="js/bootstrap.min.js") }}"></script>
        <script src="{{ url_for(".static", filename="js/psdash.js") }}"></script>
    </body>
</html>